import TaskPackageDetail from '@/views/delivery/TaskPackageDetail.vue';
import Ongoing from '@/views/delivery/orders/Ongoing.vue';

export default [
  {
    path: '/delivery',
    component: () => import('@/layouts/DeliveryLayout.vue'),
    children: [
      {
        path: '',
        redirect: '/delivery/home'
      },
      {
        path: 'home',
        name: 'DeliveryHome',
        component: () => import('@/views/delivery/Home.vue')
      },
      {
        path: 'tasks',
        name: 'Tasks',
        component: () => import('@/views/delivery/Tasks.vue'),
        meta: { title: '任务大厅', icon: 'el-icon-finished' }
      },
      {
        path: 'delivering',
        name: 'DeliveringTasks',
        component: Ongoing,
        meta: { title: '配送中', icon: 'el-icon-truck' }
      },
      {
        path: 'tasks/:packageId',
        name: 'DeliveryTaskPackageDetail',
        component: () => import('@/views/delivery/TaskPackageDetail.vue')
      },
      {
        path: 'profile',
        name: 'DeliveryProfile',
        component: () => import('@/views/delivery/Profile.vue')
      },
      {
        path: 'stats/weather',
        name: 'DeliveryStatsWeather',
        component: () => import('../views/admin/cargo/Alerts.vue'),
        meta: { title: '天气预报' }
      },
      {
        path: 'messages',
        name: 'DeliveryMessages',
        component: () => import('@/views/delivery/Messages.vue')
      },
      // 订单管理
      {
        path: 'orders/pending',
        name: 'DeliveryOrdersPending',
        component: () => import('@/views/delivery/orders/Pending.vue')
      },
      {
        path: 'orders/ongoing',
        name: 'DeliveryOrdersOngoing',
        component: () => import('@/views/delivery/orders/Ongoing.vue')
      },
      {
        path: 'orders/completed',
        name: 'DeliveryOrdersCompleted',
        component: () => import('@/views/delivery/orders/Completed.vue')
      },
      // 路线与导航
      {
        path: 'routes/plan',
        name: 'DeliveryRoutesPlan',
        component: () => import('@/views/delivery/routes/Plan.vue')
      },
      {
        path: 'routes/navigation',
        name: 'DeliveryRoutesNavigation',
        component: () => import('@/views/delivery/routes/Navigation.vue')
      },
      {
        path: 'routes/history',
        name: 'DeliveryRoutesHistory',
        component: () => import('@/views/delivery/routes/History.vue')
      },
      // 货物管理
      {
        path: 'goods/collect',
        name: 'DeliveryGoodsCollect',
        component: () => import('@/views/delivery/goods/Collect.vue')
      },
      {
        path: 'goods/exception',
        name: 'DeliveryGoodsException',
        component: () => import('@/views/delivery/goods/Exception.vue')
      },
      {
        path: 'goods/inventory',
        name: 'DeliveryGoodsInventory',
        component: () => import('@/views/delivery/goods/Inventory.vue')
      },
      // 数据统计
      {
        path: 'stats/personal',
        name: 'DeliveryStatsPersonal',
        component: () => import('@/views/delivery/stats/Personal.vue')
      }
    ]
  }
] 